var millis = 0;
var dixiemes = 0;
var secondes = 0;

function timer(){
	
	var clock = document.getElementById("clock");
	var time = document.getElementById("time");
	dixiemes ++;
	millis = millis + 100;
	time.value = millis;
	if(dixiemes % 10 == 0){
		secondes ++;
		dixiemes = 0;
	}
	if(secondes == 10){
		clock.innerHTML = "C'est fini !";
		document.forms[0].submit();
	}
	else{
		clock.innerHTML = "" + secondes + ":" + dixiemes;
		window.setTimeout("timer();", 100);
	}	
}
